#if [ $# -lt 3 ]
#then
#  echo "error input"
#  echo "example: sh -x run.sh ver blk nthread"
#  echo "ver : 1(ori), 2(manual), 3(numa_Interface)"
#  exit
#fi

#if [[ $1 -eq 1 ]]; then
#  cp 3d7p_dag_ori.c 3d7p_dag.c
#elif [[ $1 -eq 2 ]]; then
#  cp 3d7p_dag_manual.c 3d7p_dag.c
#elif [[ $1 -eq 3 ]]; then
#  cp 3d7p_dag_numa_interface.c 3d7p_dag.c
#else
#  exit
#fi

rm resultfat.log

ver=multi_dag
make clean
make $ver

./3d7p_dag_with_multi 10 4 4 24 | tee -a resultfat.log
./3d7p_dag_with_multi 10 8 8 24 | tee -a resultfat.log
./3d7p_dag_with_multi 10 16 16 24 | tee -a resultfat.log
./3d7p_dag_with_multi 10 32 32 24 | tee -a resultfat.log

ver=multi_nest
make clean
make $ver

./3d7p_dag_nest_weak_multi 10 4 4 24 | tee -a resultfat.log
./3d7p_dag_nest_weak_multi 10 8 8 24 | tee -a resultfat.log
./3d7p_dag_nest_weak_multi 10 16 16 24 | tee -a resultfat.log
./3d7p_dag_nest_weak_multi 10 32 32 24 | tee -a resultfat.log

#grep -n "\-\-exec" ./resultfat.log | awk '{print $4}'
#grep -n "total time" ./resultfat.log | awk '{print $3}'
#grep -n "out_task time avg:" ./resultfat.log | awk '{print $4}'